<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
        <meta name="format-detection" content="telephone=no">
        <title></title>
        <script type="text/javascript" src="../applyandactivate/js/stats.js" charset="UTF-8"></script>
        <link rel="stylesheet" href="../applyandactivate/css/frozen.css">
        <link rel="stylesheet" href="../applyandactivate/css/style.css">
        <script src="../applyandactivate/lib/zepto.min.js"></script>
        <script src="../applyandactivate/js/frozen.js"></script>
        <script src="../js/link.js"></script>


    </head>
    
    <body ontouchstart>
	        <header class="ui-header ui-header-stable ui-border-b xc_header">
	            <i class="ui-icon-return" onclick="window.close()"></i><h1 class="ui-txt-feeds xc_header_h1">说明页</h1>
	        </header>
		    <section class="ui-container xc_section noborder_container"  style="background: #fff;" >
				<div class="xc_item">
				
				</div>				
			</section><!-- /.ui-container-->
			 <p class="xc_item_checkbox">
                <label class="ui-checkbox-s">
                    <input type="checkbox" id="checkbox" name="checkbox" >
                </label> 我已阅读并同意<a href="#">《<em></em>》</a>
            </p>
			<div class="xc_btn_position">
            	<button id="xc_btn" class="xc_btn" form="checkbox_item">确定</button>
           </div>
    </body>
</html>
<script type="text/javascript">

	$(function(){
		info();
	})

function info(){
	//获取url中的参数

	function GetQueryString(orcode) {//截取字符串？ &
    var reg = new RegExp("(^|&)" + orcode + "=([^&]*)(&|$)","i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
        return unescape(r[2]);
    } else {
        return null;
    }
}
	var channelCode = GetQueryString("channelCode");
	var businessCode = GetQueryString("businessCode");
	var orderCode = GetQueryString("orderCode");
	var baseAddress = GetQueryString("baseAddress");
	var dataObj={
		  "channelCode": channelCode,//渠道号
		  "orderCode": orderCode,//订单号
		  "businessCode": businessCode,//业务代码
		  // "baseAddress":43
	};
	window.sessionStorage.setItem("channelCode",channelCode);//渠道号
	window.sessionStorage.setItem("orderCode",orderCode);//订单号
	window.sessionStorage.setItem("businessCode",businessCode);//业务代码
	window.sessionStorage.setItem("baseAddress",baseAddress);//基地地址
	$.ajax({
        url: activatePath+"/pingan/explain",
        type: 'post',
        dataType: 'json',
        contentType: 'application/json; charset=utf-8',
        data: JSON.stringify(dataObj),
        error: function(){}, //错误执行方法
        success: function(datas){
            // console.log(datas["obj"])
        	if (datas["success"]) {
         		$(".xc_header_h1").html(datas["obj"]["channelExplain"]["title"]);
         		$(".xc_item").html(datas["obj"]["channelExplain"]["demo"]);
         		$(".xc_item_checkbox em").html(datas["obj"]["channelExplain"]["detailTitle"]);
         		$(".xc_item_checkbox a").attr("href",datas["obj"]["channelExplain"]["detailUrl"]);
                var adsImg = datas["obj"]["channelExplain"]["adsImg"];
                window.sessionStorage.setItem("adsImg",adsImg);
          	}else{
                
          	}
        }//成功执行方法
   })
}
$("#xc_btn").click(function(){
	if($("#checkbox").attr("checked")){
		window.location.href="userinfo.html";
	}else{
		alert("请勾选");
	}
})

</script>
